<?php

function smarty_modifier_count_stu($cid)
{
    $sql = "SELECT count(*) AS  c FROM stu WHERE cid=$cid";
    $data = query($sql);
    return $data[0]['c'];
}

?>
